Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Python Tutorial
1) Buildin Function
2) Buildin Module
3) CGI Web
4) Class
5) Collections
6) Data Type
7) Database
8) Dictionary
9) File
10) Function
11) Introduction
12) List
13) Network
14) Operator
15) Regular Expressions
16) Statement
17) String
18) Thread
19) Tkinker
20) Tuple
21) Windows
22) Wxpython
23) XML
Statement
1) A dictionary-based switch
2) A Real Catch all
3) A Recursive Generator
4) A typical if statement with all three kinds of clauses
5) Analysis of examination results
6) AssertionError
7) Assertions
8) AttributeError
9) Blank except Clauses
10) Break and continue Statements, and Else Clauses on Loops
11) Break from for loop
12) Break out of a while loop
13) Break Statement
14) Breaking Out of Loops
15) Calculating compound interest
16) Catch Keyboard interrupt exception
17) Catch KeyError and AssertionError
18) Catch more than on exceptions
19) Catching Exceptions
20) Catching Exceptions with try except
21) Catching the Object
22) Catching Two Exceptions
23) Catching Two Exceptions with One Block
24) Check whether a condition is true and raises an AssertionError (optionally with a supplied error message) if it isnt
25) Class average program with sentinel-controlled repetiton
26) Continue Statement
27) Counter-controlled repetition
28) Counter-controlled repetition with the for structure and range function
29) Counting Loops
30) Creating MultiLine Statements
31) Cross-Product Pairs Example
32) Defining Clean-Up Actions
33) Demonstrating a programmer-defined exception class
34) Demonstrating exception arguments and stack unwinding
35) Elif Clauses
36) Else Clauses
37) Else Statement Take Two
38) Except Statement with Multiple Exceptions
39) Except two exceptions
40) Exception Arguments
41) Exception Classes
42) Exceptions Can Be Classes
43) Expressions and statements can span several lines
44) Fibonacci sequences using generators
45) Flatten generator rewritten as a plain function
46) For Loop and the range() Built-in Function
47) For Loops
48) Generator Expressions
49) Generator expressions and buildin functions
50) Generator expressions return a generator object, which in turn supports the iteration protocol to yield one piece of the result
51) Generator Function Example
52) Get an exceptions argument
53) Have a block of code that is executed unless something bad happens
54) If Statement
55) Import module vs from module import
56) Importing Something As Something Else
57) IndexError
58) IOError
59) Iterating List with for Loops
60) Iterating Through a Dictionary
61) KeyError
62) Making a Generator
63) Making It Safer
64) Manually iterating through a generator (or an iterator for that matter)
65) Modules can be imported directly using the package or module name
66) Multiple except Clauses
67) Namespace should be named something different
68) Nested for loops
69) Nesting Blocks
70) Nothing Happened
71) Pass Statement
72) Printing a line of text in Python
73) Printing a line with multiple statements
74) Printing multiple lines with a single statement
75) Raise error from function
76) Raise exception-type
77) Raise Statement
78) Raise value error
79) Raise ZeroDivisionError
80) Replace our single error string with the string representation of the exception argument
81) Simple exception handling example
82) Simple Generator Features
83) String-Based Exceptions
84) Summation with for
85) The Class Namespace
86) The del statement unbinds variables and attributes, and removes parts (positions, slices, or slots) from data structures (mappin
87) The else Clauses
88) The finally clause will execute, whether there was an error encountered or not
89) The if statement is used for conditional execution, and it may include elif and else clauses
90) The while Statement
91) To import only one function with a given name
92) Traceback object can print out information about the exception
93) Try statement encloses pieces of code where one or more known exceptions may occur
94) Try Statement with Multiple excepts
95) Tryexcept block that checks for correct user input
96) Tryexcept block with string argument
97) Try-except Statement
98) Try-finally Statement
99) Use a loop to ensure that the user enters a name
100) Use any of the for loop, map, or list comprehension techniques
101) Use break to stop execution and break out of the current loop
102) Use if statement to compare string
103) Using an if-else statement
104) Using finally clauses
105) Using if statements, relational operators and equality operators to show improper indentation
106) Using the break statement in a for structure
107) Using the break statement to avoid repeating code in the class-average program
108) Using the continue statement in a forin structure
109) While and else
110) While loop with counter
111) While Loops
112) With the def statement
113) Working with the Exception Information
114) ZeroDivisionError